<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>编辑人员信息</title>
    <link href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/CommunityHealthSystem_war_exploded/static/css/style.css">
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f8f9fa;
            margin: 0;
            padding: 0;
        }
        header {
            background-color: #007bff;
            color: white;
            padding: 15px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        header h1 {
            margin: 0;
            font-size: 24px;
        }
        nav {
            display: flex;
            gap: 15px;
        }
        nav a {
            color: white;
            text-decoration: none;
            padding: 8px 12px;
            border-radius: 4px;
            transition: background-color 0.3s;
        }
        nav a:hover {
            background-color: rgba(255, 255, 255, 0.2);
        }
        .container {
            max-width: 600px;
            margin: 20px auto;
            padding: 20px;
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }
        .main-title {
            font-size: 2rem;
            font-weight: bold;
            color: #343a40;
            text-align: center;
            margin-bottom: 20px;
        }
        .form-group {
            margin-bottom: 15px;
        }
        .form-label {
            display: block;
            margin-bottom: 5px;
        }
        .form-control {
            width: 100%;
            padding: 10px;
            border: 1px solid #ced4da;
            border-radius: 4px;
        }
        .btn {
            padding: 10px 15px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.3s;
        }
        .btn-primary {
            background-color: #007bff;
            color: white;
        }
        .btn-primary:hover {
            background-color: #0056b3;
        }
        .footer {
            text-align: center;
            padding: 20px;
            background-color: #f1f1f1;
            border-top: 1px solid #dee2e6;
            margin-top: 20px;
        }
    </style>
</head>

<body>
<header>
    <h1>社区健康系统</h1>
    <nav>
        <a href="index3.jsp">返回首页</a>
        <a href="ElderHealthOverview">查看老人状况</a>
        <a href="notice_manage.jsp">公告管理</a>
    </nav>
</header>

<div class="container">
    <h2 class="main-title">编辑老人信息</h2>
    <form id="elderEditForm" action="ElderInsert" method="post">
        <input type="hidden" id="elderId" name="id"> <!-- 新增隐藏字段用于存储ID -->

        <div class="form-group">
            <label for="elderName" class="form-label">姓名</label>
            <input type="text" class="form-control" id="elderName" name="name" placeholder="请输入姓名" required>
        </div>

        <div class="form-group">
            <label for="elderAge" class="form-label">年龄</label>
            <input type="number" class="form-control" id="elderAge" name="age" min="60" max="120" placeholder="请输入年龄" required>
        </div>

        <div class="form-group">
            <label for="elderGender" class="form-label">性别</label>
            <select class="form-control" id="elderGender" name="gender" required>
                <option value="">请选择性别</option>
                <option value="男">男</option>
                <option value="女">女</option>
            </select>
        </div>

        <div class="form-group">
            <label for="elderContact" class="form-label">联系方式</label>
            <input type="text" class="form-control" id="elderContact" name="contact" placeholder="请输入联系方式" required>
        </div>

        <div class="form-group">
            <label for="elderFamilyContact" class="form-label">家属联系方式</label>
            <input type="text" class="form-control" id="elderFamilyContact"
                   name="familyContact" placeholder="请输入家属联系方式">
        </div>
        <button type="submit" class="btn btn-primary">保存信息</button>
    </form>
</div>
<footer class="footer">
    <div>
        <span>&copy; 2023 社区健康系统. All rights reserved.</span>
    </div>
</footer>
</body>
</html>